Optimal. Leaf size=120 \[ \frac{x (a+b x) (A b-a B)}{b^2 \sqrt{a^2+2 a b x+b^2 x^2}}-\frac{a (a+b x) (A b-a B) \log (a+b x)}{b^3 \sqrt{a^2+2 a b x+b^2 x^2}}+\frac{B x^2 (a+b x)}{2 b \sqrt{a^2+2 a b x+b^2 x^2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0609196, antiderivative size = 120, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.074, Rules used = {770, 77} \[ \frac{x (a+b x) (A b-a B)}{b^2 \sqrt{a^2+2 a b x+b^2 x^2}}-\frac{a (a+b x) (A b-a B) \log (a+b x)}{b^3 \sqrt{a^2+2 a b x+b^2 x^2}}+\frac{B x^2 (a+b x)}{2 b \sqrt{a^2+2 a b x+b^2 x^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 770
Rule 77
Rubi steps
\begin{align*} \int \frac{x (A+B x)}{\sqrt{a^2+2 a b x+b^2 x^2}} \, dx &=\frac{\left (a b+b^2 x\right ) \int \frac{x (A+B x)}{a b+b^2 x} \, dx}{\sqrt{a^2+2 a b x+b^2 x^2}}\\ &=\frac{\left (a b+b^2 x\right ) \int \left (\frac{A b-a B}{b^3}+\frac{B x}{b^2}+\frac{a (-A b+a B)}{b^3 (a+b x)}\right ) \, dx}{\sqrt{a^2+2 a b x+b^2 x^2}}\\ &=\frac{(A b-a B) x (a+b x)}{b^2 \sqrt{a^2+2 a b x+b^2 x^2}}+\frac{B x^2 (a+b x)}{2 b \sqrt{a^2+2 a b x+b^2 x^2}}-\frac{a (A b-a B) (a+b x) \log (a+b x)}{b^3 \sqrt{a^2+2 a b x+b^2 x^2}}\\ \end{align*}
Mathematica [A] time = 0.0267332, size = 57, normalized size = 0.48 \[ \frac{(a+b x) (b x (-2 a B+2 A b+b B x)+2 a (a B-A b) \log (a+b x))}{2 b^3 \sqrt{(a+b x)^2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.006, size = 66, normalized size = 0.6 \begin{align*} -{\frac{ \left ( bx+a \right ) \left ( -{b}^{2}B{x}^{2}+2\,A\ln \left ( bx+a \right ) ab-2\,A{b}^{2}x-2\,B\ln \left ( bx+a \right ){a}^{2}+2\,abBx \right ) }{2\,{b}^{3}}{\frac{1}{\sqrt{ \left ( bx+a \right ) ^{2}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.998103, size = 117, normalized size = 0.98 \begin{align*} \frac{B a^{2} b^{2} \log \left (x + \frac{a}{b}\right )}{{\left (b^{2}\right )}^{\frac{5}{2}}} - \frac{B a b x}{{\left (b^{2}\right )}^{\frac{3}{2}}} + \frac{B x^{2}}{2 \, \sqrt{b^{2}}} - \frac{A a \sqrt{\frac{1}{b^{2}}} \log \left (x + \frac{a}{b}\right )}{b} + \frac{\sqrt{b^{2} x^{2} + 2 \, a b x + a^{2}} A}{b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.6241, size = 103, normalized size = 0.86 \begin{align*} \frac{B b^{2} x^{2} - 2 \,{\left (B a b - A b^{2}\right )} x + 2 \,{\left (B a^{2} - A a b\right )} \log \left (b x + a\right )}{2 \, b^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.375121, size = 37, normalized size = 0.31 \begin{align*} \frac{B x^{2}}{2 b} + \frac{a \left (- A b + B a\right ) \log{\left (a + b x \right )}}{b^{3}} - \frac{x \left (- A b + B a\right )}{b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.3069, size = 101, normalized size = 0.84 \begin{align*} \frac{B b x^{2} \mathrm{sgn}\left (b x + a\right ) - 2 \, B a x \mathrm{sgn}\left (b x + a\right ) + 2 \, A b x \mathrm{sgn}\left (b x + a\right )}{2 \, b^{2}} + \frac{{\left (B a^{2} \mathrm{sgn}\left (b x + a\right ) - A a b \mathrm{sgn}\left (b x + a\right )\right )} \log \left ({\left | b x + a \right |}\right )}{b^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]